<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: contracts/infinite/infinite.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_da2258ea5bfae2641df967be076d9dbe.html">infinite</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">infinite.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="infinite_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="eos_8hpp.html">eoslib/eos.hpp</a>&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="token_8hpp.html">eoslib/token.hpp</a>&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="db_8hpp.html">eoslib/db.hpp</a>&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceinfinite.html">infinite</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="namespaceinfinite.html#af2b1a7bf54ff8a0a2072831d4a7b28d5">   11</a></span>&#160;   <span class="keyword">typedef</span> <a class="code" href="structeos_1_1token.html">eosio::token&lt;uint64_t,N(currency)&gt;</a> <a class="code" href="namespaceinfinite.html#af2b1a7bf54ff8a0a2072831d4a7b28d5">CurrencyTokens</a>;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="structinfinite_1_1_transfer.html">   17</a></span>&#160;   <span class="keyword">struct </span><a class="code" href="structinfinite_1_1_transfer.html">Transfer</a> {</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="structinfinite_1_1_transfer.html#a32778297db146521c5b3146e4dc7dadb">   18</a></span>&#160;      <a class="code" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>       <a class="code" href="structinfinite_1_1_transfer.html#a32778297db146521c5b3146e4dc7dadb">from</a>;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="structinfinite_1_1_transfer.html#a51fc76c45adc5b7e002593649529c218">   19</a></span>&#160;      <a class="code" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>       <a class="code" href="structinfinite_1_1_transfer.html#a51fc76c45adc5b7e002593649529c218">to</a>;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="structinfinite_1_1_transfer.html#a7bb1f54a3a58f42f067d9a020c900ddf">   20</a></span>&#160;      CurrencyTokens    <a class="code" href="structinfinite_1_1_transfer.html#a7bb1f54a3a58f42f067d9a020c900ddf">quantity</a>;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;   };</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="structinfinite_1_1_account.html">   26</a></span>&#160;   <span class="keyword">struct </span><a class="code" href="structinfinite_1_1_account.html">Account</a> {</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="structinfinite_1_1_account.html#a8551ff19a516a724e6a18b393bbd7fd5">   27</a></span>&#160;      <a class="code" href="structinfinite_1_1_account.html#a8551ff19a516a724e6a18b393bbd7fd5">Account</a>( CurrencyTokens b = <a class="code" href="namespaceinfinite.html#af2b1a7bf54ff8a0a2072831d4a7b28d5">CurrencyTokens</a>() ):balance(b){}</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structinfinite_1_1_account.html#a8d8bddac673b236b04a576f15c99008c">   32</a></span>&#160;      <span class="keyword">const</span> <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>     key = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(account);</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="structinfinite_1_1_account.html#a0e951c8ffe750c33551d4f0497bfad9a">   33</a></span>&#160;      CurrencyTokens     <a class="code" href="structinfinite_1_1_account.html#a0e951c8ffe750c33551d4f0497bfad9a">balance</a>;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structinfinite_1_1_account.html#ab4a8ceaef79aa6f68bdf829d9b5a2f1d">   35</a></span>&#160;      <span class="keywordtype">bool</span>  <a class="code" href="structinfinite_1_1_account.html#ab4a8ceaef79aa6f68bdf829d9b5a2f1d">isEmpty</a>()<span class="keyword">const  </span>{ <span class="keywordflow">return</span> balance.<a class="code" href="structeos_1_1token.html#a3daddb64094c45d8f51897aabd44ba3d">quantity</a> == 0; }</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;   };</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;   static_assert( <span class="keyword">sizeof</span>(<a class="code" href="structinfinite_1_1_account.html">Account</a>) == <span class="keyword">sizeof</span>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>)+<span class="keyword">sizeof</span>(CurrencyTokens), <span class="stringliteral">&quot;unexpected packing&quot;</span> );</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespaceinfinite.html#a131577f948cd080aa51959041b19f7df">   39</a></span>&#160;   <span class="keyword">using</span> <a class="code" href="struct_table.html">Accounts</a> = <a class="code" href="struct_table.html">Table&lt;N(currency),N(currency),N(account),Account,uint64_t&gt;</a>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="namespaceinfinite.html#a248659d196148021650fcab73a44cb21">   50</a></span>&#160;   <span class="keyword">inline</span> <a class="code" href="structinfinite_1_1_account.html">Account</a> <a class="code" href="namespaceinfinite.html#a248659d196148021650fcab73a44cb21">getAccount</a>( <a class="code" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> owner ) {</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      <a class="code" href="structinfinite_1_1_account.html">Account</a> account;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;      <a class="code" href="struct_table.html#a50bc5f57482c6a018e7eaf4e716e038c">Accounts::get</a>( account, owner );</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      <span class="keywordflow">return</span> account;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;   }</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;} </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="ttc" id="group__types_html_gaf9c1edb0e0da55ec6ba09f32f6839529"><div class="ttname"><a href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a></div><div class="ttdeci">#define N(X)</div><div class="ttdoc">used to generate a compile time uint64_t from the base32 encoded string interpretation of X ...</div><div class="ttdef"><b>Definition:</b> types.hpp:58</div></div>
<div class="ttc" id="group__types_html_gad67b43dc23285b01176f4c181c59fc23"><div class="ttname"><a href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a></div><div class="ttdeci">uint64_t AccountName</div><div class="ttdef"><b>Definition:</b> types.h:24</div></div>
<div class="ttc" id="structinfinite_1_1_account_html"><div class="ttname"><a href="structinfinite_1_1_account.html">infinite::Account</a></div><div class="ttdoc">row in Account table stored within each scope </div><div class="ttdef"><b>Definition:</b> infinite.hpp:26</div></div>
<div class="ttc" id="namespaceinfinite_html"><div class="ttname"><a href="namespaceinfinite.html">infinite</a></div><div class="ttdoc">defines transfer struct (abi) </div><div class="ttdef"><b>Definition:</b> infinite.cpp:7</div></div>
<div class="ttc" id="group__types_html_gaaa5d1cd013383c889537491c3cfd9aad"><div class="ttname"><a href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a></div><div class="ttdeci">unsigned long long uint64_t</div><div class="ttdef"><b>Definition:</b> types.h:17</div></div>
<div class="ttc" id="token_8hpp_html"><div class="ttname"><a href="token_8hpp.html">token.hpp</a></div><div class="ttdoc">Defines types and ABI for standard token messages and database tables. </div></div>
<div class="ttc" id="eos_8hpp_html"><div class="ttname"><a href="eos_8hpp.html">eos.hpp</a></div></div>
<div class="ttc" id="structeos_1_1token_html"><div class="ttname"><a href="structeos_1_1token.html">eosio::token&lt; uint64_t, N(currency)&gt;</a></div></div>
<div class="ttc" id="namespaceinfinite_html_a248659d196148021650fcab73a44cb21"><div class="ttname"><a href="namespaceinfinite.html#a248659d196148021650fcab73a44cb21">infinite::getAccount</a></div><div class="ttdeci">Account getAccount(AccountName owner)</div><div class="ttdef"><b>Definition:</b> infinite.hpp:50</div></div>
<div class="ttc" id="structeos_1_1token_html_a3daddb64094c45d8f51897aabd44ba3d"><div class="ttname"><a href="structeos_1_1token.html#a3daddb64094c45d8f51897aabd44ba3d">eosio::token::quantity</a></div><div class="ttdeci">NumberType quantity</div><div class="ttdoc">Quantity of tokens available. </div><div class="ttdef"><b>Definition:</b> token.hpp:84</div></div>
<div class="ttc" id="structinfinite_1_1_transfer_html_a32778297db146521c5b3146e4dc7dadb"><div class="ttname"><a href="structinfinite_1_1_transfer.html#a32778297db146521c5b3146e4dc7dadb">infinite::Transfer::from</a></div><div class="ttdeci">AccountName from</div><div class="ttdef"><b>Definition:</b> infinite.hpp:18</div></div>
<div class="ttc" id="structinfinite_1_1_account_html_ab4a8ceaef79aa6f68bdf829d9b5a2f1d"><div class="ttname"><a href="structinfinite_1_1_account.html#ab4a8ceaef79aa6f68bdf829d9b5a2f1d">infinite::Account::isEmpty</a></div><div class="ttdeci">bool isEmpty() const </div><div class="ttdef"><b>Definition:</b> infinite.hpp:35</div></div>
<div class="ttc" id="structinfinite_1_1_transfer_html"><div class="ttname"><a href="structinfinite_1_1_transfer.html">infinite::Transfer</a></div><div class="ttdef"><b>Definition:</b> infinite.hpp:17</div></div>
<div class="ttc" id="structinfinite_1_1_account_html_a0e951c8ffe750c33551d4f0497bfad9a"><div class="ttname"><a href="structinfinite_1_1_account.html#a0e951c8ffe750c33551d4f0497bfad9a">infinite::Account::balance</a></div><div class="ttdeci">CurrencyTokens balance</div><div class="ttdef"><b>Definition:</b> infinite.hpp:33</div></div>
<div class="ttc" id="structinfinite_1_1_transfer_html_a7bb1f54a3a58f42f067d9a020c900ddf"><div class="ttname"><a href="structinfinite_1_1_transfer.html#a7bb1f54a3a58f42f067d9a020c900ddf">infinite::Transfer::quantity</a></div><div class="ttdeci">CurrencyTokens quantity</div><div class="ttdef"><b>Definition:</b> infinite.hpp:20</div></div>
<div class="ttc" id="structinfinite_1_1_transfer_html_a51fc76c45adc5b7e002593649529c218"><div class="ttname"><a href="structinfinite_1_1_transfer.html#a51fc76c45adc5b7e002593649529c218">infinite::Transfer::to</a></div><div class="ttdeci">AccountName to</div><div class="ttdef"><b>Definition:</b> infinite.hpp:19</div></div>
<div class="ttc" id="namespaceinfinite_html_af2b1a7bf54ff8a0a2072831d4a7b28d5"><div class="ttname"><a href="namespaceinfinite.html#af2b1a7bf54ff8a0a2072831d4a7b28d5">infinite::CurrencyTokens</a></div><div class="ttdeci">eosio::token&lt; uint64_t, N(currency)&gt; CurrencyTokens</div><div class="ttdef"><b>Definition:</b> infinite.hpp:11</div></div>
<div class="ttc" id="db_8hpp_html"><div class="ttname"><a href="db_8hpp.html">db.hpp</a></div></div>
<div class="ttc" id="struct_table_html"><div class="ttname"><a href="struct_table.html">Table</a></div><div class="ttdef"><b>Definition:</b> db.hpp:549</div></div>
<div class="ttc" id="struct_table_html_a50bc5f57482c6a018e7eaf4e716e038c"><div class="ttname"><a href="struct_table.html#a50bc5f57482c6a018e7eaf4e716e038c">Table::get</a></div><div class="ttdeci">static bool get(const PrimaryType &amp;p, Record &amp;r, uint64_t s=scope)</div><div class="ttdef"><b>Definition:</b> db.hpp:748</div></div>
<div class="ttc" id="structinfinite_1_1_account_html_a8551ff19a516a724e6a18b393bbd7fd5"><div class="ttname"><a href="structinfinite_1_1_account.html#a8551ff19a516a724e6a18b393bbd7fd5">infinite::Account::Account</a></div><div class="ttdeci">Account(CurrencyTokens b=CurrencyTokens())</div><div class="ttdef"><b>Definition:</b> infinite.hpp:27</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
